package com.zb.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zb.entity.ZjSmsReceiveRole;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 商家短信接收角色表 Mapper 接口
 * </p>
 *
 * @author WEN
 * @since 2024-05-22
 */
@Repository
public interface ZjSmsReceiveRoleMapper extends BaseMapper<ZjSmsReceiveRole> {

    /**
     * 根据短信模板ID删除短信接收者类型
     * @param smsTemplateId 短信模板ID
     * @return
     */
    int deleteBySmsTemplateId(@Param("smsTemplateId") Long smsTemplateId);

    /**
     * 根据短信编号获取接收者角色手机号
     * @param custAccId 商家ID
     * @param smsCode 短信编号
     * @return
     */
    List<ZjSmsReceiveRole> getBySmsCode(@Param("custAccId") Long custAccId, @Param("smsCode") String smsCode);
}
